<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>axios的删除提交操作</title>
	</head>
	<body>
		
		<h1>axios的远程调用练习</h1>
		删除的用户：<input type="text" v-model.lazy="name" />
		{{user.name}}
		      <button @click.lazy="fn">点击删除</button>
		<script src="../js/axios.js"></script>
		<script>
		
		// get请求的方式与delete的方式一样
		function fn(){
			
			let user={
				
				name: '唐僧'
			}
			
			axios.delete("http://localhost:8090/users/user2",{
				params: user
				
			}).then(result=>{
			  console.log(result.data)
			}		
			)
			
			
		}
		
		let user={
			
			name: '唐僧'
		}
		
		axios.delete("http://localhost:8090/users/user2",{
			params: user
			
		}).then(result=>{
		  console.log(result.data)
		}		
		)
		
		
		</script>
		
	</body>
</html>
